import axios from '@/utils/axios';
/*!
 * 我的会议，会议室使用 通用（请求）方法
 *  
 * 作者：张慢慢
 * Copyright (c) 2019/12/04
 * 
 */
/**
 * @method commentList 查询会议室评论列表
 * @param {string} rId 获取会议室评论列表需要的主键字断
 * @return axios
 */
export const commentList = (rId) => {
    return axios({
      url: `/conference/room/qry/meeting/comment/list/${rId}`,
      // headers: {'isMork': true},
      // url:'/conference/conferenceEmploy/commentList',
      method: 'get'
    })
}
//新增会议评论
export const addComment = (data) => {
    return axios({
      url: '/conference/room/qry/meeting/comment',
      // headers: {'isMork': true},
      // url:'/conference/conferenceEmploy/putCancel',
      method: 'post',
      data
    })
}
//删除会议评论
export const delComment = (commentId) => {
    return axios({
      url: `/conference/room/qry/meeting/comment/${commentId}`,
      // headers: {'isMork': true},
      // url:'/conference/conferenceEmploy/putCancel',
      method: 'delete'
    })
}
//取消会议
export const putCancel = (rId) => {
    return axios({
      // headers: {'isMork': true},
      // url:'/conference/conferenceEmploy/putCancel',
      url: `/conference/room/qry/meeting/cancel/${rId}`,
      method: 'put'
    })
}
//待处理列表查询 
export const auditList = (data) => {
  return axios({
    // headers: {'isMork': true},
    //   url:'/conference/conferenceEmploy/auditList',
    url: `/conference/room/qry/audit/list`,
    method: 'post',
    data
  })
}
//已预定列表查询  /room/qry/approved/list
export const approvedList = (data) => {
  return axios({
    // headers: {'isMork': true},
    //   url:'/conference/conferenceEmploy/approvedList',
    url: `/conference/room/qry/approved/list`,
    method: 'post',
    data
  })
}
//我发起的列表查询  /room/my/create
export const createList = (data) => {
  return axios({
    // headers: {'isMork': true},
    //   url:'/conference/conferenceEmploy/createList',
    url: `/conference/room/my/create`,
    method: 'post',
    data
  })
}
//我参与的或我发起的会议列表查询 /room/my/join
export const joinList = (data) => {
  return axios({
    // headers: {'isMork': true},
    //   url:'/conference/conferenceEmploy/joinList',
    url: `/conference/room/my/join`,
    method: 'post',
    data
  })
}
//参加或者不参加会议处理 /room/my/join/{attendeeIdattendeeId}
export const putAttendeeIdattendee = (data,attendeeId) => {
  return axios({
    // headers: {'isMork': true},
    //   url:'/conference/conferenceEmploy/putCancel',
    url: `/conference/room/my/join/${attendeeId}?attendStatus=${data.attendStatus}`,
    method: 'put',
  })
}
//会议室预定审核处理 /room/qry/audit
export const putAudit = (data,rId) => {
  return axios({
    // headers: {'isMork': true},
    //   url:'/conference/conferenceEmploy/putCancel',
    url: `/conference/room/qry/audit/${rId}?auditStatus=${data.auditStatus}&auditStatusDesc=${data.auditStatusDesc}`,
    method: 'put',
    data
  })
}
